home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 11
/
FM Towns Free Software Collection 11.iso
/
t_os
/
tool
/
artemis1
/
usrlib
/
src
/
peek.asm
< prev
next >
Wrap
Assembly Source File
|
1994-02-21
|
877b
|
54 lines
; 私製ライブラリ・メモリ篇
; (c) MATSUUCHI Ryosuke in Jan,1993
;
; peek.asm
; 任意のセレクタのメモリアクセス
;
; 1993. 1. 8(Fri)
public peekd, poked
include grplib.inc
assume cs:cseg, ds:dseg
dseg segment dword 'DATA'
dseg ends
cseg segment dword 'CODE'
;---------------------------------------------------------------
; unsigned int peekd(sel, ofs)
;---------------------------------------------------------------
peekd proc
mov ecx,[esp+4]
mov edx,[esp+8]
mov fs,cx
mov eax,fs:[edx]
ret
peekd endp
;---------------------------------------------------------------
; void poked(sel, ofs, dat)
;---------------------------------------------------------------
poked proc
mov ecx,[esp+4]
mov edx,[esp+8]
mov eax,[esp+12]
mov fs,cx
mov fs:[edx],eax
ret
poked endp
cseg ends
end